package com.ailink.sap.xml;

public class XmlUtils {

    /**
     * 反序列化
     * @param _class _class
     * @param xml xml
     * @param <T> T
     * @return T
     */
    public static <T> T deserialize(Class<?> _class, String xml) {
        XmlDeserialize xmlDeserialize = new XmlDeserialize(_class, xml);
        return xmlDeserialize.deserialize();
    }

    /**
     * 序列化
     * @param object object
     * @param isHaveHead isHaveHead
     * @return String
     */
    public static String serialize(Object object, boolean isHaveHead) {
        XmlSerialize xmlSerialize = new XmlSerialize(object, isHaveHead);
        return xmlSerialize.serialize();
    }
}
